package cn.tedu.egnotice0806.base.response;


public class JsonResult {
    private Integer state;
    private String message;
    private String data;

    public JsonResult(StatusCode statusCode) {
        this.state = statusCode.getState();
        this.message =statusCode.getMessage();
    }
    public JsonResult(StatusCode statusCode,String data) {
        this.state = statusCode.getState();
        this.message =statusCode.getMessage();
        this.data = data;
    }


    public static JsonResult ok(){
        return new JsonResult(StatusCode.OPERATION_SUCCESS);
    }


    public static JsonResult ok(String data){
        return new JsonResult(StatusCode.OPERATION_SUCCESS,data);
    }

}
